<?php

namespace Ue\ErpBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * WorkflowNode
 *
 * @ORM\Table(name="ue_workflow_node", indexes={@ORM\Index(name="workflow_id_idx", columns={"workflow_id"}), @ORM\Index(name="status_id_idx", columns={"status_id"})})
 * @ORM\Entity
 */
class WorkflowNode
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="is_start", type="integer", nullable=false)
     */
    private $isStart = '0';

    /**
     * @var integer
     *
     * @ORM\Column(name="is_end", type="integer", nullable=false)
     */
    private $isEnd = '0';

    /**
     * @var string
     *
     * @ORM\Column(name="pre_action", type="string", length=200, nullable=true)
     */
    private $preAction;

    /**
     * @var string
     *
     * @ORM\Column(name="conditions", type="string", length=200, nullable=true)
     */
    private $conditions;

    /**
     * @var string
     *
     * @ORM\Column(name="triggers", type="string", length=200, nullable=true)
     */
    private $triggers;

    /**
     * @var string
     *
     * @ORM\Column(name="comment", type="string", length=200, nullable=true)
     */
    private $comment;

    /**
     * @var \Status
     *
     * @ORM\ManyToOne(targetEntity="Status")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="status_id", referencedColumnName="id")
     * })
     */
    private $status;

    /**
     * @var \Workflow
     *
     * @ORM\ManyToOne(targetEntity="Workflow")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="workflow_id", referencedColumnName="id")
     * })
     */
    private $workflow;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set isStart
     *
     * @param integer $isStart
     * @return WorkflowNode
     */
    public function setIsStart($isStart)
    {
        $this->isStart = $isStart;

        return $this;
    }

    /**
     * Get isStart
     *
     * @return integer 
     */
    public function getIsStart()
    {
        return $this->isStart;
    }

    /**
     * Set isEnd
     *
     * @param integer $isEnd
     * @return WorkflowNode
     */
    public function setIsEnd($isEnd)
    {
        $this->isEnd = $isEnd;

        return $this;
    }

    /**
     * Get isEnd
     *
     * @return integer 
     */
    public function getIsEnd()
    {
        return $this->isEnd;
    }

    /**
     * Set preAction
     *
     * @param string $preAction
     * @return WorkflowNode
     */
    public function setPreAction($preAction)
    {
        $this->preAction = $preAction;

        return $this;
    }

    /**
     * Get preAction
     *
     * @return string 
     */
    public function getPreAction()
    {
        return $this->preAction;
    }

    /**
     * Set conditions
     *
     * @param string $conditions
     * @return WorkflowNode
     */
    public function setConditions($conditions)
    {
        $this->conditions = $conditions;

        return $this;
    }

    /**
     * Get conditions
     *
     * @return string 
     */
    public function getConditions()
    {
        return $this->conditions;
    }

    /**
     * Set triggers
     *
     * @param string $triggers
     * @return WorkflowNode
     */
    public function setTriggers($triggers)
    {
        $this->triggers = $triggers;

        return $this;
    }

    /**
     * Get triggers
     *
     * @return string 
     */
    public function getTriggers()
    {
        return $this->triggers;
    }

    /**
     * Set comment
     *
     * @param string $comment
     * @return WorkflowNode
     */
    public function setComment($comment)
    {
        $this->comment = $comment;

        return $this;
    }

    /**
     * Get comment
     *
     * @return string 
     */
    public function getComment()
    {
        return $this->comment;
    }

    /**
     * Set status
     *
     * @param \Ue\ErpBundle\Entity\Status $status
     * @return WorkflowNode
     */
    public function setStatus(\Ue\ErpBundle\Entity\Status $status = null)
    {
        $this->status = $status;

        return $this;
    }

    /**
     * Get status
     *
     * @return \Ue\ErpBundle\Entity\Status 
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Set workflow
     *
     * @param \Ue\ErpBundle\Entity\Workflow $workflow
     * @return WorkflowNode
     */
    public function setWorkflow(\Ue\ErpBundle\Entity\Workflow $workflow = null)
    {
        $this->workflow = $workflow;

        return $this;
    }

    /**
     * Get workflow
     *
     * @return \Ue\ErpBundle\Entity\Workflow 
     */
    public function getWorkflow()
    {
        return $this->workflow;
    }
}
